package com.ssy.lingxi.member.merchant.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 会员售后评论历史记录
 * @author 万宁
 * @version 2.0.0
 * @date 2020-07-16
 */
@Entity
@Table(schema = "public", name = "ms_mc_member_after_sale_history", indexes = {@Index(name="ms_mc_member_after_sale_history_member_id_idx", columnList = "memberId"), @Index(name="ms_mc_member_after_sale_history_role_id_idx", columnList = "roleId"), @Index(name="ms_mc_member_after_sale_history_sub_member_id_idx", columnList = "subMemberId"), @Index(name="ms_mc_member_after_sale_history_sub_role_id_idx", columnList = "subRoleId"), @Index(name="ms_mc_member_after_sale_history_rel_type_idx", columnList = "relType"), @Index(name="ms_mc_member_after_sale_history_create_time_idx", columnList = "createTime")})
public class MemberAfterSaleHistoryDO implements Serializable {
    private static final long serialVersionUID = -89996052273740594L;

    /**
     * 记录id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="member_after_sale_history_seq")
    @SequenceGenerator(sequenceName="ms_mc_member_after_sale_history_seq", name="member_after_sale_history_seq",allocationSize = 1)
    private Long id;

    /**
     * 创建时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime createTime;

    /**
     * 售后时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime afterSaleTime;

    /**
     * 上下级关联类型，定义在MemberRelationTypeEnum中，0-上级会员是平台 1-上级会员不是平台
     */
    @Column(columnDefinition = "int")
    private Integer relType;

    /**
     * 会员Id（记录所属的会员Id）
     */
    @Column
    private Long memberId;

    /**
     * 角色Id
     */
    @Column
    private Long roleId;

    /**
     * 评论方（上级会员名称）
     */
    @Column(columnDefinition = "varchar(200)")
    private String memberName;

    /**
     * 下级会员Id
     */
    @Column
    private Long subMemberId;

    /**
     * 下级角色Id
     */
    @Column
    private Long subRoleId;

    /**
     * 评价星级（1-5）
     */
    @Column(columnDefinition = "int")
    private Integer star;

    /**
     * 评价内容
     */
    @Column(columnDefinition = "varchar(400)")
    private String comment;

    /**
     * 售后商品
     */
    @Column(columnDefinition = "varchar(400)")
    private String product;

    /**
     * 备注（售后单号）
     */
    @Column(columnDefinition = "varchar(200)")
    private String remark;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getAfterSaleTime() {
        return afterSaleTime;
    }

    public void setAfterSaleTime(LocalDateTime afterSaleTime) {
        this.afterSaleTime = afterSaleTime;
    }

    public Integer getRelType() {
        return relType;
    }

    public void setRelType(Integer relType) {
        this.relType = relType;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public Long getSubMemberId() {
        return subMemberId;
    }

    public void setSubMemberId(Long subMemberId) {
        this.subMemberId = subMemberId;
    }

    public Long getSubRoleId() {
        return subRoleId;
    }

    public void setSubRoleId(Long subRoleId) {
        this.subRoleId = subRoleId;
    }

    public Integer getStar() {
        return star;
    }

    public void setStar(Integer star) {
        this.star = star;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
